﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.ComponentModel.DataAnnotations;

namespace BCDto.OA.WorkflowActive.WorkflowActivityStepFormItem
{
	/// <summary>
	/// 工作流活动步骤表单项
	/// </summary>
	public class WorkflowActivityStepFormItemRequestDto
	{
		/// <summary>
		/// 表单配置标题
		/// </summary>		
		[Display(Name = "表单配置标题")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(100, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string FormConfigTitle { get; set; }
		/// <summary>
		/// 表单配置Code
		/// </summary>		
		[Display(Name = "表单配置Code")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(100, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string FormConfigCode { get; set; }
		/// <summary>
		/// 表单项Code
		/// </summary>		
		[Display(Name = "表单项Code")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(100, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string FormItemCode { get; set; }
		/// <summary>
		/// 表单绑定库名称
		/// </summary>		
		[Display(Name = "表单绑定库名称")]
		[MaxLength(100, ErrorMessage = "{0} 长度应小于{1}")]
		public string FormDatabase { get; set; }
		/// <summary>
		/// 表单绑定表名称
		/// </summary>		
		[Display(Name = "表单绑定表名称")]
		[MaxLength(100, ErrorMessage = "{0} 长度应小于{1}")]
		public string FormTable { get; set; }
		/// <summary>
		/// 表单绑定字段名称
		/// </summary>		
		[Display(Name = "表单绑定字段名称")]
		[MaxLength(100, ErrorMessage = "{0} 长度应小于{1}")]
		public string BoundField { get; set; }
		/// <summary>
		/// 表单项标题
		/// </summary>		
		[Display(Name = "表单项标题")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(50, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string ItemTitle { get; set; }
		/// <summary>
		/// 表单项高度
		/// </summary>		
		[Display(Name = "表单项高度")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(10, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string ItemHeight { get; set; }
		/// <summary>
		/// 表单项顺序
		/// </summary>		
		[Display(Name = "表单项顺序")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public int ItemOrder { get; set; }
		/// <summary>
		/// 表单项类型(标题，文本框，文本区，编辑器，单选框，多选框，下拉框，日期框，附件上传，编辑表格)
		/// </summary>		
		[Display(Name = "表单项类型(标题，文本框，文本区，编辑器，单选框，多选框，下拉框，日期框，附件上传，编辑表格)")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(50, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string ItemType { get; set; }
		/// <summary>
		/// 表单项值(可以是数组，值应为保存时与原值的对比增减值，最后完成时更新原值增减即可)
		/// </summary>		
		public string ItemValue { get; set; }
		/// <summary>
		/// 表单项元素类型
		/// </summary>		
		[Display(Name = "表单项元素类型")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(50, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string PreviewType { get; set; }
		/// <summary>
		/// 表单项配置元素
		/// </summary>		
		[Display(Name = "表单项配置元素")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public string SettingElements { get; set; }
	}
}

